#include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
    vector<string>ans;
    void dfs(string& s, int n)
    {
        if (n == s.size())
        {
            ans.push_back(s);
            return;
        } 
        dfs(s, n + 1);
        if (!isdigit(s[n]))
        {
            s[n] ^= 32;
            dfs(s, n + 1);
            s[n] ^= 32;

        }

        
    }
    vector<string> letterCasePermutation(string s) {
        dfs(s, 0);
        return ans;
        
    }
    
};
//example：a1b1
//a1b1
//a1B1
//A1b1
//A1B1